package xaj.weavingtest.ast;

import java.util.List;

import abc.aspectj.ast.AJDelFactory;
import abc.aspectj.ast.AJExtFactory;
import abc.aspectj.ast.ArgPattern;
import abc.aspectj.ast.PCArgs;
import abc.aspectj.ast.PCTarget;
import abc.aspectj.ast.PCThis;

import polyglot.util.Position;
import xaj.scc.ast.SCNodeFactory_c;
import xaj.weavingtest.ast.istype.PCArgs_c_isType;
import xaj.weavingtest.ast.istype.PCTarget_c_isType;
import xaj.weavingtest.ast.istype.PCThis_c_isType;

public class XAJNodeFactory_c extends SCNodeFactory_c 
                                      implements XAJNodeFactory {
	
	public XAJNodeFactory_c() {
		this(new XAJAbstractExtFactory_c() {},
				new XAJAbstractDelFactory_c() {});
	}
	
	public XAJNodeFactory_c(XAJExtFactory extFactory) {
		this(extFactory, new XAJAbstractDelFactory_c() {});
	}
	
	public XAJNodeFactory_c(XAJExtFactory extFactory,
			XAJDelFactory delFactory) {
		super(extFactory, delFactory);
	}
	
    public PCArgs PCArgs(Position pos, List pats) {
        PCArgs n = new PCArgs_c_isType(pos,pats);
        n = (PCArgs)n.ext(((AJExtFactory) extFactory()).extPCArgs());
        n = (PCArgs)n.del(((AJDelFactory) delFactory()).delPCArgs());
        return n;
    }
    
    public PCThis PCThis(Position pos, ArgPattern pat) {
		PCThis n = new PCThis_c_isType(pos,pat);
        n = (PCThis)n.ext(((AJExtFactory) extFactory()).extPCThis());
        n = (PCThis)n.del(((AJDelFactory) delFactory()).delPCThis());
        return n;
    }
	
    public PCTarget PCTarget(Position pos, ArgPattern pat) {
		PCTarget n = new PCTarget_c_isType(pos,pat);
        n = (PCTarget)n.ext(((AJExtFactory) extFactory()).extPCTarget());
        n = (PCTarget)n.del(((AJDelFactory) delFactory()).delPCTarget());
        return n;
    }
	    
	public ListNode ListNode(Position pos, List list) {
		ListNode listnode = new ListNode_c(pos, list);
		return listnode;
	}
	
/*
	protected ExtFactory extFactory() {
		return extFactory;
	}
	
	protected DelFactory delFactory() {
		return delFactory;
	}
*/	

}
